/**
 * 
 */
package guice.command;

/**
 * @author <a href='mailto:rahul.thakur.xdev@gmail.com'>Rahul Thakur</a>
 * @since 1.0
 * @version $Id$
 */
public interface ICommandReceiver<D, R> {

	/**
	 * Sets the parameter required by the invoker instance to invoke the
	 * previously set {@link ICommand}.
	 * 
	 * @param data
	 */
	public void setData(D data);

	/**
	 * Executes this {@link ICommandReceiver} instance to yield a result of type
	 * {@link R}.
	 * 
	 * @return
	 * @throws IllegalStateException
	 *             if an {@link ICommand} instance was not specified for this
	 *             {@link ICommandInvoker} instance.
	 */
	public R execute() throws IllegalStateException;
}
